<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org">
<head>
    <title>Spring Security OAuth 2.0 Sample</title>
    <meta charset="utf-8"/>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
    <link href="/webjars/bootstrap/css/bootstrap.css" rel="stylesheet"
          th:href="@{/webjars/bootstrap/css/bootstrap.css}"/>
</head>
<body>
<div class="container">
    <h1>Login</h1>
    <p style="font-weight:bold;color:red;" th:if="${loginError}">Wrong username or password</p>
    <form method="post" th:action="@{/login}">
        <div class="form-row">
            <div class="form-group">
                <label for="username">Username</label>
                <input autofocus="autofocus" class="form-control" id="username" name="username" type="text">
                <small class="form-text text-muted">user1 / password</small>
            </div>
        </div>
        <div class="form-row">
            <div class="form-group">
                <label for="password">Password</label>
                <input class="form-control" id="password" name="password" type="password">
            </div>
        </div>
        <button class="btn btn-primary" type="submit">Log in</button>
    </form>
</div>
<script src="/webjars/jquery/jquery.min.js" th:src="@{/webjars/jquery/jquery.min.js}"></script>
<script src="/webjars/bootstrap/js/bootstrap.min.js" th:src="@{/webjars/bootstrap/js/bootstrap.min.js}"></script>
</body>
</html>